<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="java.util.List"%>  
<%@page import="org.imis.domain.*"%>  
 <%@taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
 <s:debug></s:debug>
 <%List list = (List)request.getAttribute("list"); %>
 <table>
 <tr><td>id</td><td>标题</td><td>点击量</td><td>时间</td><td>功能</td></tr>
 <%
 int PageN=Integer.parseInt(request.getParameter("pageN"));
 String table = request.getParameter("table");  
 for(int i =0;i<list.size();i++)
 {

 if(table.equals("News"))
 {
	
	    News news =(News) list.get(i);
	 
	 
	 
	 
 %>
 <tr>
 <td><%=news.getId() %></td><td><%=news.getTitle() %></td><td><%=news.getClick() %></td>
 <td><%=news.getTime() %></td><td><a href="findone.action?table=<%=table %>&id=<%=news.getId()%>">修改</a></td><td><a href="deletenews.action?table=<%=table %>&id=<%=news.getId()%>&pageN=<%=PageN%>">删除</a></td>
 </tr>
 <%}
 if(table.equals("Notice"))
 {
	  Notice news =(Notice) list.get(i);
 
		 
		 
 %>
  <tr>
 <td><%=news.getId() %></td><td><%=news.getTitle() %></td><td><%=news.getClick() %></td>
 <td><%=news.getTime() %></td><td><a href="findone.action?table=<%=table %>&id=<%=news.getId()%>">修改</a></td><td><a href="deletenews.action?table=<%=table %>&id=<%=news.getId()%>&pageN=<%=PageN%>">删除</a></td>
 </tr>
 <%}

  if(table.equals("Forum"))
 {
	  Forum news =(Forum) list.get(i);
 
		 
		 
 %>
  <tr>
 <td><%=news.getId() %></td><td><%=news.getTitle() %></td><td><%=news.getClick() %></td>
 <td><%=news.getTime() %></td><td><a href="findone.action?table=<%=table %>&id=<%=news.getId()%>">修改</a></td><td><a href="deletenews.action?table=<%=table %>&id=<%=news.getId()%>&pageN=<%=PageN%>">删除</a></td>
 </tr>

  <%}

  if(table.equals("Information"))
 {
	  Information news =(Information) list.get(i);
 
		 
		 
 %>
  <tr>
 <td><%=news.getId() %></td><td><%=news.getTitle() %></td><td><%=news.getClick() %></td>
 <td><%=news.getTime() %></td><td><a href="findone.action?table=<%=table %>&id=<%=news.getId()%>">修改</a></td><td><a href="deletenews.action?table=<%=table %>&id=<%=news.getId()%>&pageN=<%=PageN%>">删除</a></td>
 </tr>
 <%
 }

  if(table.equals("PConsult"))
 {
	  PConsult news =(PConsult) list.get(i);
 
		 
		 
 %>
  <tr>
 <td><%=news.getId() %></td><td><%=news.getTitle() %></td><td><%=news.getClick() %></td>
 <td><%=news.getTime() %></td><td><a href="findone.action?table=<%=table %>&id=<%=news.getId()%>">修改</a></td><td><a href="deletenews.action?table=<%=table %>&id=<%=news.getId()%>&pageN=<%=PageN%>">删除</a></td>
 </tr>

  <%
 }

  if(table.equals("RConsult"))
 {
	  RConsult news =(RConsult) list.get(i);
 
		 
		 
 %>
  <tr>
 <td><%=news.getId() %></td><td><%=news.getTitle() %></td><td><%=news.getClick() %></td>
 <td><%=news.getTime() %></td><td><a href="findone.action?table=<%=table %>&id=<%=news.getId()%>">修改</a></td><td><a href="deletenews.action?table=<%=table %>&id=<%=news.getId()%>&pageN=<%=PageN%>">删除</a></td>
 </tr>
   <%
 }

  if(table.equals("StudentShip"))
 {
	  StudentShip news =(StudentShip) list.get(i);
 
		 
		 
 %>
  <tr>
 <td><%=news.getId() %></td><td><%=news.getTitle() %></td><td><%=news.getClick() %></td>
 <td><%=news.getTime() %></td><td><a href="findone.action?table=<%=table %>&id=<%=news.getId()%>">修改</a></td><td><a href="deletenews.action?table=<%=table %>&id=<%=news.getId()%>&pageN=<%=PageN%>">删除</a></td>
 </tr>
  <%
 }

  if(table.equals("StuGroup"))
 {
	  StuGroup news =(StuGroup) list.get(i);
 
		 
		 
 %>
  <tr>
 <td><%=news.getId() %></td><td><%=news.getTitle() %></td><td><%=news.getClick() %></td>
 <td><%=news.getTime() %></td><td><a href="findone.action?table=<%=table %>&id=<%=news.getId()%>">修改</a></td><td><a href="deletenews.action?table=<%=table %>&id=<%=news.getId()%>&pageN=<%=PageN%>">删除</a></td>
 </tr>
   <%
 }

  if(table.equals("StuHonor"))
 {
	  StuHonor news =(StuHonor) list.get(i);
 
		 
		 
 %>
  <tr>
 <td><%=news.getId() %></td><td><%=news.getTitle() %></td><td><%=news.getClick() %></td>
 <td><%=news.getTime() %></td><td><a href="findone.action?table=<%=table %>&id=<%=news.getId()%>">修改</a></td><td><a href="deletenews.action?table=<%=table %>&id=<%=news.getId()%>&pageN=<%=PageN%>">删除</a></td>
 </tr>
 <%}} %>
 
 
 </table>
 <a href="findallaction.action?table=<%=table %>&pageN=<%=PageN-1%>">上一页</a><a href="findallaction.action?table=<%=table %>&pageN=<%=PageN+1%>">下一页</a>
</body>
</html>